<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>使用thymeleaf模板</title>
</head>
<body>

<span style="font-size: medium;">thymeleaf模板</span>

<h1> 欢迎：<span th:text="${username}"></span></h1>

<table border="1" style="width: 50%">
    <tr>
        <th>序号</th>
        <th>学科</th>
        <th>成绩</th>
    </tr>
    <tr th:each="userScore:${userScores}">
        <td th:text="${userScoreStat.index+1}"></td>
        <td th:text="${userScore.subject}"></td>
        <td th:text="${userScore.score}"></td>
    </tr>
</table>
</body>
</html>